package com.gao.api.gate.quick.proto.point;

import com.gao.api.gate.quick.core.service.Service;
import com.gao.api.gate.quick.proto.http.Request;
import com.gao.api.gate.quick.proto.http.Response;
import io.netty.handler.codec.http.HttpContent;
import io.netty.handler.codec.http.LastHttpContent;

/**
 * <p></p>
 *
 * @author gaoshuangwen
 * @since 2022/01/13 16:56
 */
public interface EndpointHandler extends Service {

    EndpointHandler config(Config config);

    EndpointHandler onReq(Handler<Request> handler);

    EndpointHandler onResp(Handler<Response> handler);

    EndpointHandler onContext(Handler<HttpContent> handler);

    EndpointHandler onLastContext(Handler<LastHttpContent> handler);

    EndpointHandler onThrowable(Handler<Throwable> handler);


}
